package com.guo.hui.controller.mobile;

import java.util.ArrayList;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.github.pagehelper.PageInfo;
import com.guo.hui.controller.BaseController;
import com.guo.hui.dao.shiro.TpUserMapper;
import com.guo.hui.model.mobile.MyUser;
import com.guo.hui.util.UtilJson;

@Controller
@RequestMapping("/mobile")
public class MyImController {

	@Autowired
	private TpUserMapper userDao;

	@ResponseBody
	@RequestMapping(value = "/userdata", produces = "text/html;charset=UTF-8")
	public String userdata(Model mm) {
		List<MyUser> list = new ArrayList<>();
		MyUser user = new MyUser();
		user.setId(1);
		user.setUsername("国辉");
		user.setPassword("123456");
		MyUser user1 = new MyUser();
		user1.setId(2);
		user1.setUsername("zixian");
		user1.setPassword("654321");
		list.add(user);
		list.add(user1);
		return UtilJson.toJson(list);
	}

}
